﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;
using Microsoft.ConfigurationManagement.ManagementProvider;
using Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine;

namespace TimNilimaaConsulting.DeploymentWeb.ViewModels
{
    public class NewComputerViewModel
    {
        [Required]
        [Display(Name = "Computer Name")]
        public string Name { get; set; }

        [Required]
        [RegularExpression(@"/^([0-9a-f]{1,2}[\.:-]?){5}([0-9a-f]{1,2})$/i", ErrorMessage = "The MAC Address must be provided in the XX:XX:XX:XX:XX:XX notation.")]
        [Display(Name = "MAC Address")]
        public string MacAddress { get; set; }
        
        [Display(Name = "OU Distinguised Name")]
        public string OU { get; set; }


/*
            var GenreLst = new List<string>();

            var GenreQry = from d in _db.Blog
                           orderby d.BlogName
                           select d.BlogName;
            GenreLst.AddRange(GenreQry.Distinct());
            ViewBag.movieGenre = new SelectList(GenreLst);

            return View(_db.Comments.ToList());
        */



        [Display(Name = "Collection Name")]
        //public string Collection { get; set; }
        public string Collection
        {
            get;
            set;
        }





        [Display(Name = "Collection ID")]
        public string CollectionId { get; set; }
    }

    public class ListComputerViewModel
    {
        [Display(Name = "Computer Name")]
        public string Name { get; set; }

        [Display(Name = "ResourceID")]
        public uint ResourceId { get; set; }

        [Display(Name = "MAC Addresses")]
        public string[] MacAddresses { get; set; }
    }
}